package com.wangsd.web.coupon.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "integral_detail")
@ApiModel(value = "积分明细表", description = "积分明细表")
public class IntegralDetail {

    @ApiModelProperty(value = "id")
    /*mybatis plus 自增主键*/
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "（逻辑删除）是否已删；0，未删，1，已删")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "积分")
    private Integer Integral;

    @ApiModelProperty(value = "（小程序openId")
    private String openId;

    @ApiModelProperty(value = "0,扣积分；1，加积分")
    private Integer status;

    @ApiModelProperty(value = "0:签到积分;1:云支付回调；2：积分兑换；3：pc端扣积分；4：pc端清零积分；5，pc端补录积分；6，商品购买添加积分；7，用户退款扣除积分；8购买商家券添加积分")
    private Integer type;

    @ApiModelProperty(value = "备注")
    private String remark;
}
